import Vue from 'vue'
import Vuex from 'vuex'
// 引入mutations、actions、getters
import mutations from './mutations'
import actions from './actions'
import getters from './getters'

Vue.use(Vuex);

// 存放数据
const state = {
    count: 0,
    // 购物车数据
    listData: [{
            imgUrl: "https://img01.yzcdn.cn/vant/cat.jpeg",
            title: "2021新款韩版chic潮流小皮鞋...",
            param: "皮鞋：黑色 37",
            price: "100.00",
            num: 1,
            id: 0,
            checked: true,
        },
        {
            imgUrl: "https://img01.yzcdn.cn/vant/cat.jpeg",
            title: "2021新款韩版chic潮流小皮鞋...",
            param: "皮鞋：黑色 38",
            price: "200.00",
            num: 1,
            id: 1,
            checked: true,
        },
        {
            imgUrl: "https://img01.yzcdn.cn/vant/cat.jpeg",
            title: "2021新款韩版chic潮流小皮鞋...",
            param: "皮鞋：黑色 39",
            price: "300.00",
            num: 1,
            id: 2,
            checked: true,
        }
    ],

    // 首页每日秒杀
    dailySeckillList:[
        {imgUrl:"../../../../static/images/home/dailySeckillList1.png",price:"￥36....",id:"1"},
        {imgUrl:"../../../../static/images/home/dailySeckillList2.png",price:"￥45....",id:"2"},
        {imgUrl:"../../../../static/images/home/dailySeckillList3.png",price:"￥54....",id:"3"},
        {imgUrl:"../../../../static/images/home/dailySeckillList4.png",price:"￥55....",id:"4"},
    ]
};

// 暴露store实例
export default new Vuex.Store({
    state,
    actions,
    mutations,
    getters
});